#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/1/16 0016 11:46
# @Author  : Arliki
# @email   : hkdnxycz@outlook.com
# @File    : robots
#               ┏┓      ┏┓
#             ┏┛┻━━━┛┻┓
#             ┃      ☃      ┃
#             ┃  ┳┛  ┗┳  ┃
#             ┃      ┻      ┃
#             ┗━┓      ┏━┛
#                 ┃      ┗━━━┓
#                 ┃  神兽保佑    ┣┓
#                 ┃　永无BUG。   ┏┛
#                 ┗┓┓┏━┳┓┏┛
#                   ┃┫┫  ┃┫┫
#                   ┗┻┛  ┗┻┛
import requests
import re
import pandas as pd
import time
import random
from lxml import etree
from multiprocessing.managers import BaseManager
import queue

send = queue.Queue()
receive = queue.Queue()


def f_send():
    global send
    return send


def f_receive():
    global receive
    return receive


class Ro(BaseManager):
    pass


def run():
    Ro.register('ro_send_queue', callable=f_send)
    Ro.register('ro_receive_queue', callable=f_receive)
    manager = Ro(address=('127.0.0.1', 5000), authkey=b"68868")
    manager.start()
    send = manager.ro_send_queue()
    receive = manager.ro_receive()
    for size in range(1, 500):
        print(size, 'is send')
        send.put(size)
    for x in range(1, 500):
        try:
            r = receive.get(timeout=8)
            if r == 'ok':
                pass
            else:
                new_size = 'd'
        except:
            pass


import re
if __name__ == '__main__':
    a = "2018/03/30062439318282.jpg"
    print('2018/' in a)
